data acquisition from the accelerometer